const express = require('express');
const app = express();
app.listen(4000,()=>{
    console.log('web服务器工作在4000端口');
});

let userRouter = require('./2-user.js');
let qiantaiRotuer = require('./2-qiantai');
app.use(userRouter);  //app.use():使用中间件
// app.use('/myapi',userRouter); 
app.use('/api',userRouter); 
app.use('/demo',qiantaiRotuer);